﻿//  Copyright (c) 2010 Ray Liang (http://www.dotnetage.com)
//  Dual licensed under the MIT and GPL licenses:
//  http://www.opensource.org/licenses/mit-license.php
//  http://www.gnu.org/licenses/gpl.html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web;
using System.Web.UI;
using System.Xml;


namespace DNA.Mvc.jQuery
{
    public class SiteMapNodeBuilder : NodeItemBuilder<SiteMap, SiteMapNode, SiteMapNodeFactory, SiteMapNodeBuilder>
    {
        public SiteMapNodeBuilder(SiteMapNode node, ViewContext viewContext, IViewDataContainer viewContainer) : base(node, viewContext, viewContainer) { }

        public SiteMapNodeBuilder Columns(int count)
        {
            if (count > 0)
                Component.ColumnCount = count;
            return this;
        }

        protected override SiteMapNodeFactory CreateFactory()
        {
            return new SiteMapNodeFactory(this.Component, this.ViewContext,this.ViewDataContainer);
        }

    }
}
